Imports PTIC_Util.GestionCalculs
Imports Actuariat

Namespace moteurTauxGaranti2
    Public Class ParamSimulIndList
        Implements IList
        Protected _lParametresSimulIndiv As New List(Of ParamSimulInd)

        Public Sub CopyTo(ByVal array As System.Array, ByVal index As Integer) Implements System.Collections.ICollection.CopyTo
            _lParametresSimulIndiv.CopyTo(array, index)
        End Sub
        Public ReadOnly Property Count() As Integer Implements System.Collections.ICollection.Count
            Get
                Return _lParametresSimulIndiv.Count
            End Get
        End Property
        Private ReadOnly Property IsSynchronized() As Boolean Implements System.Collections.ICollection.IsSynchronized
            Get
                Return True
            End Get
        End Property
        Private ReadOnly Property SyncRoot() As Object Implements System.Collections.ICollection.SyncRoot
            Get
                Return Nothing
            End Get
        End Property
        Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
            Return _lParametresSimulIndiv.GetEnumerator
        End Function
        Public Function Add(ByVal value As Object) As Integer Implements System.Collections.IList.Add
            Dim e As New ParamSimulIndListEventArgs(value)
            _lParametresSimulIndiv.Add(value)
            RaiseEvent afterAdd(Me, e)
            Return _lParametresSimulIndiv.IndexOf(value)
        End Function
        Public Sub Clear() Implements System.Collections.IList.Clear
            _lParametresSimulIndiv.Clear()
        End Sub
        Public Function Contains(ByVal value As Object) As Boolean Implements System.Collections.IList.Contains
            Return _lParametresSimulIndiv.Contains(value)
        End Function
        Public Function IndexOf(ByVal value As Object) As Integer Implements System.Collections.IList.IndexOf
            Return _lParametresSimulIndiv.IndexOf(value)
        End Function
        Public Sub Insert(ByVal index As Integer, ByVal value As Object) Implements System.Collections.IList.Insert
            _lParametresSimulIndiv.Insert(index, value)
        End Sub
        Public ReadOnly Property IsFixedSize() As Boolean Implements System.Collections.IList.IsFixedSize
            Get
                Return False
            End Get
        End Property
        Public ReadOnly Property IsReadOnly() As Boolean Implements System.Collections.IList.IsReadOnly
            Get
                Return False
            End Get
        End Property
        Default Public Property Item(ByVal index As Integer) As Object Implements System.Collections.IList.Item
            Get
                Return _lParametresSimulIndiv.Item(index)
            End Get
            Set(ByVal value As Object)
                _lParametresSimulIndiv.Item(index) = value
            End Set
        End Property
        Public Sub Remove(ByVal value As Object) Implements System.Collections.IList.Remove
            Dim e As New ParamSimulIndListEventArgs(value)
            _lParametresSimulIndiv.Remove(value)
            RaiseEvent afterRemove(Me, e)
        End Sub
        Public Sub RemoveAt(ByVal index As Integer) Implements System.Collections.IList.RemoveAt
            Dim e As New ParamSimulIndListEventArgs(Item(index))
            _lParametresSimulIndiv.RemoveAt(index)
            RaiseEvent afterRemove(Me, e)
        End Sub

        Public Event afterAdd As ParamSimulIndListEventHandler
        Public Event afterRemove As ParamSimulIndListEventHandler


    End Class
End Namespace
